﻿namespace Digitalmes.Application.Mes;

/// <summary>
/// 公共服务
/// </summary>
[AllowAnonymous]
[ApiExplorerSettings(GroupName = "mes")]
public sealed class CommonService : IDynamicWebApiService
{
    /// <summary>
    /// 当前时间格式化值，格式 "yyyyMMddHHmmss"。
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    public string GetDateTimeFormat()
    {
        return DateTime.Now.ToString("yyyyMMddHHmmss");
    }

    /// <summary>
    /// 获取系统当前时间。
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    public DateTime Now()
    {
        return DateTime.Now;
    }
}
